<form 
  action ='<?php echo url_for('dados_comerciais/filter') ?>' 
  id='form_filter_dados_comerciais' 
  name='form_filer_dados_comerciais' 
  method='POST' 
>

<table class="form">
	<tr><th colspan="2" class="title">Filtro</th></tr>
      <tr>
        <th><?php echo $form['nm_empresa']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['nm_empresa']->render(
        			array(
        				'name' => 'filter[nm_empresa]',
        				'value' => $filter->get('nm_empresa')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_razao_social']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['ds_razao_social']->render(
        			array(
        				'name' => 'filter[ds_razao_social]',
        				'value' => $filter->get('ds_razao_social')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_atividade']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['ds_atividade']->render(
        			array(
        				'name' => 'filter[ds_atividade]',
        				'value' => $filter->get('ds_atividade')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['st_atividade']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['st_atividade']->render(
        			array(
        				'name' => 'filter[st_atividade]',
        				'value' => $filter->get('st_atividade')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['id_usuario']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['id_usuario']->render(
        			array(
        				'name' => 'filter[id_usuario]',
        				'value' => $filter->get('id_usuario')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_cnpj']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['nu_cnpj']->render(
        			array(
        				'name' => 'filter[nu_cnpj]',
        				'value' => $filter->get('nu_cnpj')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_tempo_atividade']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['nu_tempo_atividade']->render(
        			array(
        				'name' => 'filter[nu_tempo_atividade]',
        				'value' => $filter->get('nu_tempo_atividade')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_funcionarios']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['nu_funcionarios']->render(
        			array(
        				'name' => 'filter[nu_funcionarios]',
        				'value' => $filter->get('nu_funcionarios')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_socios']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['nu_socios']->render(
        			array(
        				'name' => 'filter[nu_socios]',
        				'value' => $filter->get('nu_socios')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['tel_fixo']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['tel_fixo']->render(
        			array(
        				'name' => 'filter[tel_fixo]',
        				'value' => $filter->get('tel_fixo')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['tel_fixo_extra']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['tel_fixo_extra']->render(
        			array(
        				'name' => 'filter[tel_fixo_extra]',
        				'value' => $filter->get('tel_fixo_extra')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['icms']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['icms']->render(
        			array(
        				'name' => 'filter[icms]',
        				'value' => $filter->get('icms')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['created_at']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['created_at']->render(
        			array(
        				'name' => 'filter[created_at]',
        				'value' => $filter->get('created_at')
        			)	
        		)
        	?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['updated_at']->renderLabel() ?></th>
        <td>
        	<?php 
        		echo $form['updated_at']->render(
        			array(
        				'name' => 'filter[updated_at]',
        				'value' => $filter->get('updated_at')
        			)	
        		)
        	?>
        </td>
      </tr>
	<tr>
		<td colspan="2">
			<input type="submit" value=":: Filtrar ::" />
			&nbsp;
			<?php
			    if($filter->ativo()):
    				echo link_to(
    					':: Limpar ::',
    					$sf_context->getModuleName().'/filter',
    					array('class'=>'botao')
    				);
				endif;
			?>
		</td>
	</tr>
</table>
</form>